//
//  XiangyaDuihuanCell.swift
//  HappyEat
//
//  Created by 张继强 on 17/1/24.
//  Copyright © 2017年 陌路是我. All rights reserved.
//

import UIKit

class XiangyaDuihuanCell: UITableViewCell {
    
    var leftIcon:UIImageView = UIImageView.init(image: UIImage.init(named: "ic_am"))
    
    var rightIcon:UIImageView = UIImageView.init(image: UIImage.init(named: "ic_G"))
    
    var titileLabel:UILabel = UILabel.init()
    override func awakeFromNib() {
        super.awakeFromNib()
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
    }
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.setUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
    }
}
extension XiangyaDuihuanCell{
    func setUI(){
      self.contentView.addSubview(self.leftIcon)
        self.contentView.addSubview(self.titileLabel)
        self.contentView.addSubview(self.rightIcon)
        self.leftIcon.snp.makeConstraints { (make) in
            make.size.equalTo(CGSize.init(width: 20, height: 20))
            make.top.equalTo(15)
            make.left.equalTo(16)
        }
        self.rightIcon.snp.makeConstraints { (make) in
           make.size.equalTo(CGSize.init(width: 13.5, height: 10))
            make.top.equalTo(20)
            make.right.equalTo(-16)
        }
        self.titileLabel.snp.makeConstraints { (make) in
            make.left.equalTo(self.leftIcon.snp.right).offset(0)
            make.right.equalTo(self.rightIcon.snp.left).offset(0)
            make.height.equalTo(16)
            make.top.equalTo(17)
        }
        self.titileLabel.font = UIFont.systemFont(ofSize: 16)
        self.titileLabel.textColor = BaseFontColor
        self.titileLabel.textAlignment = .center
    }
}
